/// 登录成功返回信息
class LoginResponseDto {
  /// 用户ID
  final int? userId;
  /// 系统代码：1-客户端 2-平台端 3-核销代理端 4-财务代理端
  final int? systemCode;
  /// 用户名
  final String? userName;
  /// 用户姓名
  final String? fullName;
  /// 用户等级
  final String? levelName;
  /// token
  final String? token;

  LoginResponseDto({
    this.userId,
    this.systemCode,
    this.userName,
    this.fullName,
    this.levelName,
    this.token,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (userId != null) data['userId'] = userId;
    if (systemCode != null) data['systemCode'] = systemCode;
    if (userName != null) data['userName'] = userName;
    if (fullName != null) data['fullName'] = fullName;
    if (levelName != null) data['levelName'] = levelName;
    if (token != null) data['token'] = token;
    return data;
  }

  factory LoginResponseDto.fromJson(Map<String, dynamic> json) {
    return LoginResponseDto(
      userId: json['userId'],
      systemCode: json['systemCode'],
      userName: json['userName'],
      fullName: json['fullName'],
      levelName: json['levelName'],
      token: json['token'],
    );
  }
}